/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.sistem.informasi.form;

import com.sistem.informasi.pojo.Cabang;
import com.sistem.informasi.util.SistemInformasiUtil;
import java.util.List;
import org.hibernate.Session;

/**
 *
 * @author Adika
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello World");
        Session s = SistemInformasiUtil.getSessionFactory().getCurrentSession();
        s.beginTransaction();
        
        List<Cabang> cabang = s.createQuery("from Cabang").list();
        
        for(Cabang isiCabang : cabang){
            System.out.println(isiCabang.getIdCabang()+" | "+isiCabang.getNamaCabang());
        }
    }
}
